import {
  Controller,
  Get,
  Query,
  Post,
  Body,
  UseInterceptors,
} from '@nestjs/common';
import { AddressService } from './address.service';
import { TransformInterceptor } from 'src/interceptor/transform.interceptor';

@Controller('address')
@UseInterceptors(TransformInterceptor)
export class AddressController {
  constructor(private readonly addressService: AddressService) {}
  @Get()
  getAddress(@Query() query) {
    return this.addressService.getAddress(query);
  }
  @Post()
  createAddress(@Body() body) {
    return this.addressService.createAddress(body);
  }
}
